/*
 moxl - Modular XML Library
 Copyright (c) 2007, Malcolm Sparks

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
package moxl.dom;

import java.util.List;

public interface MoxlElement extends MoxlNode
{
	QualifiedName getName();

	String getLocalName();

	XmlNamespace getNamespace();

	MoxlAttributeMap getAttributeMap();

	MoxlAttribute getAttributeObj(QualifiedName name);

	MoxlAttribute getAttributeObjByString(String name);

	List<MoxlElement> getChildElements();

	MoxlElement getFirstChildElement(QualifiedName name);

	MoxlElement getFirstChildElement(String name);

	List<MoxlElement> getChildElements(QualifiedName name);

	List<MoxlElement> getChildElements(String name);

	MoxlElement getRequiredChildElement(QualifiedName name) throws XmlInfosetException;

	String getContent();

	// TODO: This might be desirable, but make sure that mutating methods on the list, such as remove(), actually work as expected, otherwise return a
	// Collection
	List<MoxlNode> getChildren();

	boolean isEmpty();

	boolean containsCharacterData();

	boolean containsCharacterDataExcludingWhitespace();

	MoxlElement getChildElement(int index);

	MoxlNode getChildNode(int index);

	int countChildNodes();

	MoxlElement getChildElement(QualifiedName name, int index);
	
	int countChildElements();

	XmlNamespaceContext getNamespaceContext();

	boolean containsChild(MoxlNode child);

	boolean hasAttribute(String name);

}
